// 对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
    {
        // 登录
        path: '/login',
        component: () => import('@/views/user/login/index.vue'),
        name: 'login',
        meta: {
            title: '登录', // 菜单标题
            hidden: true, // 代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: '', // 菜单文字左侧的图标,支持element-plus全部图标
        },
    },
    {
        // 注册
        path: '/register',
        component: () => import('@/views/user/register/index.vue'),
        name: 'register',
        meta: {
            title: '注册', // 菜单标题
            hidden: true, // 代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: '', // 菜单文字左侧的图标,支持element-plus全部图标
        },
    },
    {
        // 登录成功以后展示数据的路由
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled',
                },
            },
        ],
    },
    {
        path: '/personal',
        component: () => import('@/layout/index.vue'),
        name: 'personal',
        children: [
            {
                path: '/personal',
                component: () => import('@/views/user/personal/index.vue'),
                meta: {
                    title: '个人中心',
                    hidden: true,
                    icon: '',
                },
            },
        ],
    },
    {
        // 权限路由 401
        path: '/401',
        component: () => import('@/views/error/401.vue'),
        name: '401',
        meta: {
            title: 'error',
            hidden: true,
            icon: '',
        },
    },
    /*{
        // 任意路由 404
       path: '/:pathMatch(.*)*',
        component: () => import('@/views/error/404.vue'),
        name: '404',
        meta: {
            title: 'error',
            hidden: true,
            icon: '',
        },
    },*/
]

